<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扩展运算符 ****</title>
</head>
<body>
    <script>
        //扩展运算符其实是 rest 参数的逆运算  ...
        //数组的展开  
        // let arr = ['苏有朋','吴奇隆','陈志朋'];// ...arr  =>  '苏有朋','吴奇隆','陈志朋'

        // function test(){
        //     console.log(arguments);
        // }

        // test(...arr);//test('苏有朋','吴奇隆','陈志朋')

        //对象的展开  
        let sOne = {
            q: '天音波',
            Q: '回音击'
        };

        // ...sOne =>  q:'天音波', Q: '回音击'
        let sTwo = {
            w: '金钟罩',
            W: '铁布衫',
            q: '闪现'
        };
        
        let result = {...sOne, ...sTwo};

        console.log(result);
    </script>
    
</body>
</html>